package com.jkm.service.impl;

import com.jkm.domain.User;
import com.jkm.mapper.UserMapper;
import com.jkm.service.UserService;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;

@Service
public class UserServiceImpl implements UserService {

    @Resource
    private UserMapper userMapper;

    @Override
    public int insert(User record) {
        int a = userMapper.insert(record);
        System.out.println(1/0);
        return a;
    }

    @Override
    public User selectByPrimaryKey(Long id) {
        return userMapper.selectByPrimaryKey(id);
    }

    @Override
    public List<User> selectAll() {
        return userMapper.selectAll();
    }
}
